using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

namespace Unity.Per.Common.WebRPC
{
    public class WebRPCDownFile :BaseWebRPC
    {
        public string fileStorePath;

        public WebRPCDownFile(string url, string kHttpVerb, string fileStorePath,bool AddToken = true) : base(url, kHttpVerb, AddToken) {
            this.fileStorePath = fileStorePath;
        }

        protected override void AddDownloadHander(UnityWebRequest www) {
            base.AddDownloadHander(www);
            if ( fileStorePath == "" )
                return;

            www.downloadHandler = new DownloadHandlerFile(fileStorePath);
        }

    }
}
